package com.atguigu.create.prototype.deep;

import java.math.BigDecimal;

public class SheepClient {
    public static void main(String[] args) throws CloneNotSupportedException {
        SheepMaster master = new SheepMaster("齐备", true);
        Sheep sheep = new Sheep("肖恩",5, BigDecimal.valueOf(50),master);
        System.out.println(sheep+":"+sheep.hashCode()+":"+sheep.getSheepMaster().hashCode());
        Sheep clone = sheep.clone();
        System.out.println(clone+":"+clone.hashCode()+":"+clone.getSheepMaster().hashCode());

        clone.setAge(10);
        System.out.println(sheep);
    }
}
